﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Newtonsoft.Json.Linq;

namespace XBMCRemote.DataModel.Xbmc
{
    public class VideoLibrary
    {
        private JsonRpcClient _client;
        public VideoLibrary(JsonRpcClient client)
        {
            _client = client;
        }

        public void GetMovies()
        {
            IList<string> fieldList = new List<string> {"plot", "genre", "title", "year", "runtime", "rating"};
            JArray fieldsArray = new JArray(fieldList);
            JProperty fieldsProperty = new JProperty("fields", fieldsArray);
            JObject obj = new JObject(fieldsProperty);

            _client.Invoke("VideoLibrary.GetMovies", obj);
        }
    }
}
